package com.didispace.domain;


import lombok.*;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 *
 * @author 程序猿DD
 * @version 1.0.0
 * @blog http://blog.didispace.com
 *
 */
@Getter
@Setter
@NoArgsConstructor
@ToString
public class UserValid {
    private Long id;

    @NotBlank(message="用户名不能为空")
    private String name;

    @NotBlank(message="年龄不能为空")
    @Pattern(regexp="^[0-9]{1,2}$",message="年龄不正确")
    private String age;
}
